from CRC import * #import the Checksum functions
from BioloidHighLevelCmds import *
#! /usr/bin/python

# To change this template, choose Tools | Templates
# and open the template in the editor.

__author__="mlopes"
__date__ ="$7/Nov/2009 18:02:58$"

print "Init Comms"
initComm(8)

posename = raw_input("Poses name")
print posename

filename = posename+".txt"
#filelog = open(filename,"w")

menu = 'h'

poses = []
nposes = 0

actpose = []

actpose = getServos()
menu = 'a'

#while(menu != 'q'):
menu = raw_input(" U - Update Values\n S - Save pos\n P #i - Play pose #i \n R #m - Release Motor #m\n M #m #p - Move motor #m to position #p")

print menu

if menu == 'S':
    print "S"
elif menu == 'P':
    print "P"
elif menu == 'U':
    print "U"
    print getServos()
elif menu == 'M':
    print "M"
    id, pos = raw_input("id pos").split(" ")
    setServo( int(id), int(pos))

exit()
#filelog.writelines( str(imu) )

#filelog.close()